import 'package:inmotion_pro/service/realtime_data_server/vehicle_realtime_data/vehicle_data_base.dart';
import 'package:safemap/safemap.dart';

import '../../../pages/models/battery_pack_model.dart';

class VehicleBatteryInfo extends VehicleDataBase {
  List<BatteryPackModel> batteryPacks = [];

  VehicleBatteryInfo.fromMap(Map<String, dynamic>? data) : super.fromMap(data) {
    SafeMap map = SafeMap(data);
    batteryPacks = (map['batteryPacks'].list ?? [])
        .map((e) => BatteryPackModel.fromMap(e))
        .toList();
  }
}
